package com.mzpai.product.service.impl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mzpai.product.mapper.SystemAdminMapper;
import com.mzpai.product.model.SystemAdmin;
import com.mzpai.product.service.SystemAdminService;
import com.mzpai.service.impl.BaseServiceImpl;
/**
 *
 * <b>用户信息 | Service</b><br>
 *
 * yanglijun 2021-03-17 22:16:20
 * 
 *  @version 1.0.0
 *
 */
@Service
public class SystemAdminServiceImpl extends BaseServiceImpl<SystemAdmin> implements SystemAdminService {

	Logger logger = LoggerFactory.getLogger(SystemAdminServiceImpl.class);

	@Autowired 
	private SystemAdminMapper mapper;

	/**
	 * 根据手机号，查询
	 * @param sim
	 * @return
	 */
	@Override
	public SystemAdmin queryBySim(String sim) {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("account", sim);
		List<SystemAdmin> list = mapper.getList(map);
		if(!list.isEmpty()) {
			return list.get(0);
		}
		return null;
	}
}